package com.leetcode.LC;

public class LC1446 {
    public int maxPower(String s) {

        s += "1";
        int max = 0, count = 0;
        for (int i = 0; i < s.length() - 1; i++) {
            if (s.charAt(i) == s.charAt(i + 1)) {
                count++;
            } else {
                count++;
                max = Math.max(max, count);
                count = 0;
            }
        }
        return max;
    }

    public static void main(String[] args) {
        System.out.println(new LC1446().maxPower("hooraaaaaaaaaaay"));
    }

}
